package com.fzs.sshd.cli.server.filter;

import org.apache.sshd.common.session.Session;
import org.apache.sshd.server.forward.X11ForwardingFilter;

/**
 * x11动态校验
 */
public class ADBX11ForwardingFilter implements X11ForwardingFilter {
    @Override
    public boolean canForwardX11(Session session, String request) {
        System.out.println("canForwardX11 request:" + request);
        if (session.getUsername().startsWith("local-")){
            return false;
        }
        return true;
    }
}
